﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI.Script
{
    public class DataResultScriptObject
    {
        public DataResultScriptObject(ServiceProxy.DataServiceRef.DataResult dataResult)
        {
            this.name = dataResult.Name;

            if (dataResult.DataSeries != null)
            {
                this.series = new DataSeriesScriptObject[dataResult.DataSeries.Length];
                for (int index = 0; index < this.series.Length; index++)
                {
                    this.series[index] = new DataSeriesScriptObject(dataResult.DataSeries[index]);
                }
            }
        }

        public string name
        {
            get;
            private set;
        }

        public DataSeriesScriptObject[] series
        {
            get;
            private set;
        }
    }
}
